<template>
  <div>
     <h1>子组件</h1>
     <!-- 经常会v-bind="attrs" 来给二次封装的组件传递所有父传子数据 -->
     <!-- <el-button v-bind="attrs"> </el-button> -->
        <h1>{{attrs.color}}</h1>
        <h1>{{attrs.age}}</h1>
        <h1>{{attrs.shengao}}</h1>
        
        <slot name="footer" :row="row"></slot>
  </div>
</template>
<script setup>
// useAttrs 获取父传子的数据 除props之外的数据
   import {useAttrs,reactive,useSlots} from 'vue'
   let attrs= useAttrs()
  console.log(attrs,"attrs---所有数据")
   let row=reactive({
      id:1,
      age:2,
      name:"张三",
      sex:"男"
   })
  //  useSlots 获取插槽内容
   let slots=useSlots()
   console.log(slots,"slots---插槽内容")
</script>